﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CpartyBank.aspx.cs" Inherits="Customer_Profile.eCard.CpartyBank" %>

<%@ Register Src="../mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<%@ Register assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxDataView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Customer List</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
    <meta content="C#" name="CODE_LANGUAGE" />
    <meta content="JavaScript" name="vs_defaultClientScript" />
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/style.css" type="text/css" rel="stylesheet" />

    <script language="javascript" type="text/javascript" src="/js/common.js"></script>

    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
    <script language="javascript">
        // <!CDATA[
        //function is called on changing focused row
        function OnGridFocusedRowChanged() {
            // Query the server for the "EmployeeID" and "Notes" fields from the focused row 
            // The values will be returned to the OnGetRowValues() function     
            gridBank.GetRowValues(gridBank.GetFocusedRowIndex(), 'account_name;account_no;bank_name;bank_branch;bank_sub_branch;location;city;Bankaccount_id;in_use', OnGetRowValues);
        }
        //Value array contains "EmployeeID" and "Notes" field values returned from the server 
        function OnGetRowValues(values) {
            //txtAccountName..SetImageUrl("FocusedRow.aspx?Photo=" + values[0]);
            accountname.SetText(values[0]);
            accountno.SetText(values[1]);

            bankname.SetText(values[2]);
            branch.SetText(values[3]);
            subbranch.SetText(values[4]);
            abc.SetText(values[5]);
            cba.SetText(values[6]);            
            inuse.SetText(values[8]);
            //hidid
            var cpartyaccountid = document.getElementById("hidid");
            cpartyaccountid.value = values[7];
        }
    </script>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
    <form id="Form1" runat="server">
        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="1" background="/images/dot_vline.gif">
                    <img height="1" src="/images/spacer.gif" width="1"></td>
                <td valign="top" width="15">
                    <img height="1" src="/images/spacer.gif" width="15"></td>
                <td valign="top">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td style="height: 23px">
                                <uc1:mainTop ID="MainTop1" runat="server" />
                                <span class="navi-blu"><span class="navi-blk">龙腾旅游礼包 &gt; 客户管理 &gt; 银行账户管理</span>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td background="/images/dot_hline.gif">
                                <img height="1" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>

                    <table bordercolor="#c2d2e2" cellspacing="0" cellpadding="2" width="100%" border="1">
                        <tr>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td bgcolor="#1765a7">
                                            <img height="11" src="/images/pic_results.gif" width="61"></td>
                                    </tr>
                                </table>
                                <dx:ASPxGridView ID="gridBank" ClientInstanceName="gridBank" runat="server"  Width="100%" KeyFieldName="Bankaccount_id" 
                                    CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                    CssPostfix="Office2003Blue">      
                                    <SettingsBehavior AllowFocusedRow="True" />
                                    <ClientSideEvents FocusedRowChanged="function(s, e) { OnGridFocusedRowChanged(); }"/>                                                                  
                                    <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                                        </LoadingPanelOnStatusBar>
                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </Images>
                                    <ImagesFilterControl>
                                        <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                                        </LoadingPanel>
                                    </ImagesFilterControl>
                                    <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                                        CssPostfix="Office2003Blue">
                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                        </Header>
                                        <LoadingPanel ImageSpacing="10px">
                                        </LoadingPanel>
                                    </Styles>
                                    <StylesEditors>
                                        <ProgressBar Height="25px">
                                        </ProgressBar>
                                    </StylesEditors>
                                    <Columns>
                                         <dx:GridViewDataColumn FieldName="Bankaccount_id" VisibleIndex="1" Caption="编号" />
                                         <dx:GridViewDataColumn FieldName="account_name" VisibleIndex="2" Caption="账户名称" />                        
                                         <dx:GridViewDataColumn FieldName="account_no" VisibleIndex="3" Caption="账户号" />
                                         <dx:GridViewDataColumn FieldName="bank_name" VisibleIndex="4" Caption="银行名称" />
                                         <dx:GridViewDataColumn FieldName="bank_branch" VisibleIndex="5" Caption="分行" />
                                         <dx:GridViewDataColumn FieldName="bank_sub_branch" VisibleIndex="6" Caption="支行" />
                                         <dx:GridViewDataColumn FieldName="location" VisibleIndex="7" Caption="地区" />
                                         <dx:GridViewDataColumn FieldName="city" VisibleIndex="8" Caption="城市" />
                                         <dx:GridViewDataColumn FieldName="in_use" VisibleIndex="9" Caption="是否有效" />
                                     </Columns>
                                </dx:ASPxGridView>                                
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="3" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>                    
                    <br>
                    <table cellspacing="0" cellpadding="0" width="100%" border="1">
                        <tr>
                            <td>账户名称：<font color="red">*</font></td>
                            <td>                                
                                <dx:ASPxTextBox ID="accountname" runat="server" Width="170px" ClientInstanceName="accountname">
                                </dx:ASPxTextBox>
                                <asp:HiddenField ID="hidid" runat="server" />                                
                            </td>
                            <td>账户号：<font color="red">*</font></td>
                            <td>                                
                                <dx:ASPxTextBox ID="accountno" runat="server" Width="170px" ClientInstanceName="accountno">
                                </dx:ASPxTextBox>
                            </td>                            
                        </tr>
                        <tr>
                            <td>
                                银行名称：<font color="red">*</font>
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="bankname" runat="server" Width="170px" ClientInstanceName="bankname">
                                </dx:ASPxTextBox>
                            </td>
                            <td>
                                分行/支行:<font color="red">*</font>
                            </td>
                            <td>
                            <table>
                                <tr>
                                    <td><dx:ASPxTextBox ID="branch" runat="server" ClientInstanceName="branch" size="30"></dx:ASPxTextBox></td>
                                    <td>/</td>
                                    <td><dx:ASPxTextBox ID="subbranch" runat="server" ClientInstanceName="subbranch" size="30"></dx:ASPxTextBox></td>
                                </tr>
                            </table>
                            </td>
                        </tr>
                        <tr>
                            <td>省份：<font color="red">*</font></td>
                            <td><dx:ASPxTextBox ID="location" runat="server" ClientInstanceName="abc" Width="170px">
                                </dx:ASPxTextBox>
                            </td>
                            <td>城市：<font color="red">*</font></td>
                            <td>                                
                                <dx:ASPxTextBox ID="city" runat="server" Width="170px" ClientInstanceName="cba">
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                是否有效：
                            </td>
                            <td>                                
                                <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ClientInstanceName="inuse">
                                    <Items>
                                        <dx:ListEditItem Text="Y" Value="Y" Selected="true" />
                                        <dx:ListEditItem Text="N" Value="N" />
                                    </Items>
                                </dx:ASPxComboBox>
                            </td>
                            <td>提示：</td>
                            <td>
                                <asp:Label ID="lblWarning" runat="server" ForeColor="Red"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan=4>
                                <asp:Button ID="btnSave" runat="server" Text="添加" onclick="btnSave_Click" />&nbsp;
                                <asp:Button ID="btnUpate" runat="server" Text="修改" onclick="btnUpate_Click" />&nbsp;                                
                            </td>                            
                        </tr>
                    </table>
                </td>
                <td valign="top" width="10">
                    <img height="1" alt="" src="/images/spacer.gif" width="10"></td>
            </tr>
        </table>
    </form>
</body>
</html>